class Base:
    def greet(self):
        print("Hello from Base")

class Sub(Base):
    def greet(self):
        super().greet()
        print("Hello from Sub")

obj = Sub()
obj.greet()  # 输出：Hello from Base\nHello from Sub
